home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / indexing / IXPostingList.h < prev    next >
Text File  |  1994-04-13  |  2KB  |  50 lines

  1. /*
  2. IXPostingList.h
  3. Copyright 1991,NeXT Computer,Inc.
  4. */
  5.  
  6. #import    <objc/List.h>
  7. #import    <remote/transport.h>
  8.  
  9. #import    "protocols.h"
  10.  
  11. // this class implements a lazy, weighted list of objects, accessible by 
  12. // reading from a record source.  when encoding for remote transport, this
  13. // class assumes that the objects it contains will free after encoding. it
  14. // also free its own instance after encoding, since it always goes by copy. 
  15.  
  16. @interface IXPostingList: List <NXTransport,IXPostingExchange>
  17. {
  18. @public
  19.     unsigned            maxPointers;
  20.     id <IXRecordReading>    recordSource;
  21.     struct IXPosting        *postingList;
  22. }
  23.  
  24. - (id <IXRecordReading>)source;
  25. - initWithSource:(id <IXRecordReading>)aSource;
  26. - initWithSource:(id <IXRecordReading>)aSource 
  27.     andPostingsIn:(id <IXPostingExchange>)anObject;
  28.  
  29. - addObject:anObject withWeight:(unsigned)weight;
  30. - insertObject:anObject withWeight:(unsigned)weight at:(unsigned)index;
  31. - replaceObjectAt:(unsigned)index with:anObject weight:(unsigned)weight;
  32.  
  33. - (unsigned)indexForHandle:(unsigned)handle;
  34. - (unsigned)handleOfObjectAt:(unsigned)index;
  35. - (unsigned)weightOfObjectAt:(unsigned)index;
  36.  
  37. - addHandle:(unsigned)handle withWeight:(unsigned)weight;
  38. - insertHandle:(unsigned)handle withWeight:(unsigned)weight at:(unsigned)index;
  39. - replaceHandleAt:(unsigned)index 
  40.     with:(unsigned)handle weight:(unsigned)weight;
  41.  
  42. - sortByWeightAscending:(BOOL)boolean;
  43. - sortBySelector:(SEL)selector ascending:(BOOL)boolean;
  44.  
  45. - read:(NXTypedStream *)typedStream;
  46. - write:(NXTypedStream *)typedStream;
  47.  
  48. @end
  49.  
  50.